<?php
if (!defined('ABSPATH')) {
	define('ABSPATH', dirname(dirname(__FILE__)) . '/');
}

require_once ABSPATH . 'dr-config.php';
require_once ABSPATH . DRINC . '/dr-base.php';
require_once ABSPATH . DRINC . '/dr-functions.php';

require_once ABSPATH . DRINC . '/dr-smarty.php';

$user_id = dr_is_login_on();

$posts = array(
	'action' => 'get_username',
	'user_id' => $user_id
);

$data = json_decode(dr_server_request('dr-app-users.php', $posts), true);

$smarty->assign("username", $data['username']);
$smarty->assign("is_login", $user_id);
